/*
 * @Author: Albert
 * @Date: 2019-06-12 13:41:09
 * @Last Modified by: v_songliuyang_dxm
 * @Last Modified time: 2021-10-08 11:20:55
 */
function toNum (a) {
  var a = a.toString()
  var c = a.split('.')
  // var num_place=["","0","00","000","0000"],r=num_place.reverse();
  var r = ['0000', '000', '00', '0', '']
  for (var i = 0; i < c.length; i++) {
    var len = c[i].length
    c[i] = r[len] + c[i]
  }
  var res = c.join('')
  return res
}
//  a 当前版本  b 写死的比较版本
// 检测是否是新版本
function checkPlugin (a, b) {
  var a = toNum(a)
  var b = toNum(b)
  if (a >= b) {
    return true
  } else {
    return false
  }
}
export default checkPlugin
